#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>  //兔子数列整体左移一项
int Fib(int n)
{
	int a = 1;
	int b = 2;
	int c = 1;

	while (n > 2)
	{
		c = a + b;
		a = b;
		b = c;
		n--;
	}
	return c;
}

int main()
{
	int n, ret;
	scanf("%d", &n);

	if (n == 2)
		ret = 2;
	else
		ret = Fib(n);

	printf("%d", ret);
	return 0;
}